package com.vf.activity.mapper;

import java.util.List;

import com.vf.activity.domain.Activities;
import com.vf.activity.domain.DTO.ActDTO;
import com.vf.activity.domain.DTO.Activities2DTO;
import com.vf.activity.domain.DTO.ActivitiesDTO;
import com.vf.activity.domain.DTO.ActivityTypeDTO;
import com.vf.activity.domain.VO.ActivityVO;
import com.vf.activity.domain.VO.AddActivityVO;
import com.vf.common.utils.PageUtils;
import com.vf.user.domain.DTO.AppDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 活动Mapper接口
 * 
 * @author LBS
 * @date 2025-06-04
 */
@Mapper
public interface ActivitiesMapper 
{
    /**
     * 查询活动
     * 
     * @param activityId 活动主键
     * @return 活动
     */
    public Activities selectActivitiesByActivityId(Long activityId);

    /**
     * 查询活动列表
     * 
     * @param activities 活动
     * @return 活动集合
     */
    public List<Activities> selectActivitiesList(Activities activities);

    /**
     * 新增活动
     * 
     * @param activities 活动
     * @return 结果
     */
    public int insertActivities(Activities activities);

    /**
     * 修改活动
     * 
     * @param activities 活动
     * @return 结果
     */
    public int updateActivities(Activities activities);

    /**
     * 删除活动
     * 
     * @param activityId 活动主键
     * @return 结果
     */
    public int deleteActivitiesByActivityId(Long activityId);

    /**
     * 批量删除活动
     * 
     * @param activityIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteActivitiesByActivityIds(Long[] activityIds);

    /**
     * 通过活动名称查询活动信息
     *
     * @param activityName 活动名称
     * @return 结果
     */
    List<Activities> selectActivitiesListByName(String activityName);

    /**
     * 查询活动列表
     *
     * @param activities 活动
     * @return 活动集合
     */
    List<ActivitiesDTO> selectActivitiesAllList(@Param("activities") ActDTO activities);

    List<ActivitiesDTO> listByGroup(Long[] userIds);

    int addActivity(ActivityVO activityVO);

    List<Activities> selectActivitiesListAll(ActDTO activities);

    ActivitiesDTO getInfoById(Long activityId);

    List<ActivitiesDTO> joinActivityById(@Param("userId") Long userId,@Param("status") String  status);

    List<ActivitiesDTO> getReceivedInviteCount(Long userId);

    List<ActivitiesDTO> getSentInviteCount(Long userId);

    int respondToInvite(AppDTO appDTO);

    int publishActivity(Activities2DTO activities2DTO);

    ActivitiesDTO getInfoById2(Long activityId);

    Activities findActivityById(AddActivityVO addActivityVO);


    int insertActivityParticipants(@Param("applicationId") Long applicationId,@Param("applicantId") Long applicantId);

    Integer getActiveOpen();

    List<ActivitiesDTO> getAllActivities(ActivityTypeDTO activityTypeDTO);

    /**
     * 查询活动总数（用于分页）
     * 
     * @param activities 活动条件
     * @return 活动总数
     */
    int selectActivitiesAllListCount(ActDTO activities);
}
